from django.conf.urls import url, include

from web.views import account, project, dashboard, wiki, issues, statistics, file, setting

urlpatterns = [

    url(r'^register/', account.register, name='register'),

    url(r'^send/sms_code/', account.sms_code, name='sms_code'),

    # 短信验证码登录
    url(r'^login_sms/', account.login_sms, name='login_sms'),

    url(r'^login/', account.login, name='login'),
    url(r'^img_code/', account.img_code, name='img_code'),

    # 首页
    url(r'^index/', account.index, name='index'),
    # 注销
    url(r'^logout/', account.logout, name='logout'),

    # 项目相关内容
    url(r'^project_list/', project.project_list, name='project_list'),

    # 添加星标
    # project/star/(\w+)/(\d+)/  项目类型join和项目id
    url(r'^project/star/(\w+)/(\d+)/', project.project_star, name='project_star'),
    url(r'^project/unstar/(\w+)/(\d+)/', project.project_unstar, name='project_unstar'),

    # url(r'^manage/(?P<pro_id>\d+)/dashboard/', dashboard.dashboard, name='dashboard'),

    url(r'^manage/(?P<pro_id>\d+)/', include([

        url(r'dashboard/', dashboard.dashboard, name='dashboard'),
        url(r'issues/', issues.issues, name='issues'),
        url(r'file/', file.file, name='file'),
        url(r'setting/', setting.setting, name='setting'),
        url(r'wiki/', wiki.wiki, name='wiki'),
        url(r'wiki_add/', wiki.wiki_add, name='wiki_add'),
        url(r'wiki_edit/(?P<wiki_id>\d+)/', wiki.wiki_edit, name='wiki_edit'),
        url(r'wiki_delete/(?P<wiki_id>\d+)/', wiki.wiki_delete, name='wiki_delete'),
        url(r'wiki_catalog/', wiki.wiki_catalog, name='wiki_catalog'),
        url(r'wiki_upload/', wiki.wiki_upload, name='wiki_upload'),



        url(r'statistics/', statistics.statistics, name='statistics'),

    ], ))






]
